﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="Ventas.aspx.cs" Inherits="Laundry_Default" %>
<asp:Content ID="Content4" ContentPlaceHolderID="title" Runat="Server">
    Cortes
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderBreadcrumbs" Runat="Server">
    <ul>
        <li>Reportes</li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceMain" Runat="Server">

    <h2 class="pagetitle">Listado</h2>
    <div class="block">
        <asp:DropDownList runat="server" ID="drpClient" CssClass="dropdown-filter" OnSelectedIndexChanged="drpClient_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
        <asp:ImageButton class="button-filter" runat="server" ID="btnSearch" AlternateText="Buscar" ToolTip="Buscar" OnClick="btnSearch_Click" ImageUrl="~/img/search-icon.png"/>
    </div>
    <div class="column1-unit">
        <asp:gridview ID="grid" runat="server" OnPageIndexChanging="grid_PageIndexChanging" OnSorting="grid_Sorting" DataSourceID="ds" 
            AutoGenerateColumns="False" EmptyDataText="No Existen Registros" AllowPaging="True" PageSize="10" DataKeyNames="Id" 
            BorderWidth="1" CellPadding="5" CellSpacing="0" ShowFooter="false" AlternatingRowStyle-CssClass="row-alternation"
            OnRowDataBound="grid_RowDataBound">
                <Columns>  

                   <asp:TemplateField HeaderText="Fecha" HeaderStyle-CssClass="top" HeaderStyle-Width="80px" SortExpression="Date">
                        <ItemTemplate>    
                            <asp:Label ID="lblDate" runat="server" Text='<%# Bind("Date","{0:dd/MM/yyyy}") %>'></asp:Label>     
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="C.I/Rif" HeaderStyle-CssClass="top" SortExpression="ClientDocumentId">
                        <ItemTemplate>    
                            <asp:Label ID="lblClientDocumentId" runat="server" Text='<%# Bind("ClientDocumentId") %>'></asp:Label>     
                        </ItemTemplate>
                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Cliente" HeaderStyle-CssClass="top" SortExpression="ClientName">
                        <ItemTemplate>    
                            <asp:Label ID="lblClientName" runat="server" Text='<%# Bind("ClientName") %>'></asp:Label>     
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Total" HeaderStyle-CssClass="top" SortExpression="total">
                        <ItemTemplate>    
                            <asp:Label ID="lblTotal" runat="server" Text='<%# Bind("total") %>'></asp:Label>     
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:gridview>
             <asp:ObjectDataSource ID="ds" runat="server" TypeName="BLLLaundry" SelectMethod="GetSales"
                EnablePaging="true" SelectCountMethod="GetSalesCount" StartRowIndexParameterName="startRow"
                MaximumRowsParameterName="pageSize" SortParameterName="sortColumns" UpdateMethod="Update">        
                <SelectParameters>
                    <asp:SessionParameter  DefaultValue="" Name="sortExp" SessionField="sortExp" Type="String" />
                    <asp:SessionParameter DefaultValue="" Name="sortDirection" SessionField="sortDirection" Type="String" />
                    <asp:SessionParameter  DefaultValue="" Name="pageIndex" SessionField="pageIndex" Type="Int32" />
                    <asp:SessionParameter  DefaultValue="" Name="filterSearch" SessionField="filterSearch" Type="String" />
                </SelectParameters>              
            </asp:ObjectDataSource>
        </div>
</asp:Content>

